package main

import (
	"fmt"
	"math"
)

type Shape interface {
	perimeter()
}

type Circle struct {
	radis float32
}

func (c Circle) perimeter() float32 {
	return c.radis * 2 * math.Pi
}

type Rectangle struct {
	width  float32
	height float32
}

func (r Rectangle) perimeter() float32 {
	return 2 * (r.height + r.width)
}

func main() {
	var r Rectangle
	var c Circle
	r = Rectangle{4, 8}
	c = Circle{5}

	fmt.Println(r.perimeter())
	fmt.Println(c.perimeter())

	// c1 := make(channel string)
	// c2 := make(channel string)
	// c1 <- "hello"
	// c2 <- "world"
	// select {
	// case msg1 := <- c1:
	// fmt.Println("Message 1", msg1)
	// case msg2 := <- c2:
	// fmt.Println("Message 2", msg2)
	// case <- time.After(time.Second):
	// fmt.Println("timeout")
	// }
}
